package com.unm.core;

import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

public class Config {

  private static final String CONFIG_BUNDLE_NAME = "core";

  public Config() {
  }
   
  public static String getDBUrl(int db) throws Exception {
    PropertyResourceBundle configBundle = (PropertyResourceBundle)
        ResourceBundle.getBundle(CONFIG_BUNDLE_NAME);
    return configBundle.getString("DBUrl"+((db==0)?"":db+""));
  }
  public static int getDBType() throws Exception {
	    PropertyResourceBundle configBundle = (PropertyResourceBundle)
	        ResourceBundle.getBundle(CONFIG_BUNDLE_NAME);
	    String ret = configBundle.getString("DBType");
	    return Integer.parseInt(ret);
	  }
  public static String getWebPath() throws Exception {
    PropertyResourceBundle configBundle = (PropertyResourceBundle)
        ResourceBundle.getBundle(CONFIG_BUNDLE_NAME);
    return configBundle.getString("WebPath");
  }

  public static String getSrv() throws Exception {
	  PropertyResourceBundle configBundle = (PropertyResourceBundle)ResourceBundle.getBundle(CONFIG_BUNDLE_NAME);
      return configBundle.getString("Srv");
  }
  public static String getvtGo() throws Exception {
	  PropertyResourceBundle configBundle = (PropertyResourceBundle)ResourceBundle.getBundle(CONFIG_BUNDLE_NAME);
      return configBundle.getString("vtGo");
  }
}

